package cn.tedu.boot05.mapper;

import cn.tedu.boot05.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;

@Mapper
public interface UserMapper {
    @Select("SELECT id FROM user WHERE username=#{username}")
    User selectByUsername(String username);
     @Insert("INSERT INTO user VALUES (NULL ,#{username},#{password},#{nickname})")
    void insert(User user);


}
